<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            #panel{
                width: 800px;
                height: 500px;
            }
            .border{
                width: 500px;
                height: 500px;
            }
        </style>
    </head>
    <body>
        <div id="panel">

        </div>
        <form>
            <div class="border">
                <textarea class="ckeditor" name="content"></textarea>
            </div>

        </form>
        <script src="/static/lib/sb-admin/vendor/jquery/jquery.min.js"></script>
        <script src="/static/lib/echarts/js/echarts.min.js"></script>
        <script src="/static/lib/ckeditor/ckeditor.js"></script>
        <script>
            var myChart = echarts.init(document.getElementById("panel"));

            var option = {
                title: {
                    text: "老边测试echarts"
                },
                tooltip: {},
                legend: {
                    data: ["考勤"]
                },
                xAxis: {
                    data: []
                },
                yAxis: {},
                series: [
                    {
                        name: "考勤",
                        type: "bar",
                        data: []
                    }
                ]
            };

            $.ajax(
                {
                    url: "/test_data/",
                    type: "get",
                    data: "",
                    success: function (data) {
                        option["xAxis"]["data"] = data["x_data"];
                        option["series"][0]["data"] = data["y_data"];
                        myChart.setOption(option)
                    },
                    error: function () {

                    }
                }
            )

        </script>
    </body>
</html>